package com.headStorm.guava.manyThread;

import com.google.common.util.concurrent.FutureCallback;
import com.headStorm.concurrent.manyThread.MainThreadBlocking;
import org.checkerframework.checker.nullness.qual.Nullable;

import javax.imageio.stream.IIOByteBuffer;
import java.nio.ByteBuffer;
import java.util.Arrays;

public class CallBackDemo implements FutureCallback<String> {
    @Override
    public void onSuccess(@Nullable String s) {
        System.out.println("线程执行成功之后的回调函数");
        System.out.println(s);
    }

    @Override
    public void onFailure(Throwable throwable) {
        System.out.println("失败");
    }

    public static void main(String[] args) {
        ByteBuffer byteBuffer = ByteBuffer.allocate(10);
        byteBuffer.reset();
    }
}
